﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace PowerManage.Entity;

/**
 * 实体基类
 */
public class EleEntity {
    /**
     * key:指定主键  DatabaseGenerated(DatabaseGeneratedOption.Identity)：自动增长
     */
    [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public long Id { get; set; }

    [Comment("创建者Id")] public long CreatorId { get; set; }

    [Comment("创建时间")] public DateTime CreationTime { get; set; } = DateTime.Now;

    [Comment("最后编辑时间")] public DateTime LastModificationTime { get; set; }
}